﻿package com.unifiedfield{
	import flash.display.MovieClip;
	public class Node {
		public var Parent:Node=null;
		public var Children:Array=new Array();
		public var Body:String="";
		public var movieclip:MovieClip;
		public var connectedto:MovieClip;
		public var id:String="";
		public var opened=false;
		public var lvl=0;
		public function Node(body,l,i){
			Parent=null;
			Children=new Array();
			movieclip=null;
			connectedto=null;
			Body=body;
			opened=false;
			lvl=l;
			id=i;
		}
		public function addchild(n:Node){
			Children.push(n);
			n.Parent=this;
		}
		public function associate(mc){
			movieclip=mc;
		}
		public function updatetext(){
			movieclip.main.text=Body;
		}
	}
}